//
//  SEExamineRecordFundusCell.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/14.
//

import UIKit

struct SEExamineRecordFundusCellModel {
    var titleText: String = ""
    var imgUrlStr: String = ""
}

class SEExamineRecordFundusCell: UITableViewCell {

    override func awakeFromNib() {
        super.awakeFromNib()
        backgroundColor = .white
        contentView.backgroundColor = .white
    }
    
    func updateWithViewModel(_ model: SEExamineRecordFundusCellModel) {
        titleLabel.text = model.titleText
        fundusImageView.kf.setImage(urlString: model.imgUrlStr)
    }
    
    @IBOutlet private weak var titleLabel: UILabel!
    @IBOutlet private weak var fundusImageView: UIImageView! {
        didSet {
            fundusImageView.setLayerCorners(rect: fundusImageView.bounds, radius: 4)
            fundusImageView.backgroundColor = .gray
            fundusImageView.addImageBrownTap()
        }
    }
}
